<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" charset="UTF-8">
$(function() {
	
	$('#user_login_loginForm').form({
		url : '${pageContext.request.contextPath}/userAction!login.action',
		success : function(data) {
			var obj = $.parseJSON(data);
			if(obj.success) {
				yy.CUser = obj.object;
				$('#user_login_loginDialog').dialog('close');
				initUserInfo();
			}	
			$.messager.show({
				title:'系统提示',
				msg:obj.msg
			});
		}
	});
	
	$('#user_login_loginForm input').bind('keyup', function(event) {
		if(event.keyCode == 13) {
			$('#user_login_loginForm').submit();
		}
	});
});
</script>
<div id="user_login_loginDialog" class="easyui-dialog" data-options="iconCls:'icon-group',title:'系统登录',
				modal:true,
				width : 320,
				height : 170,
				closed : true,
				closable:false,
				buttons:[{
					text:'登 录',
					handler:function(){
						$('#user_login_loginForm').submit();
					}
				}]">
	<form id="user_login_loginForm" method="post">
		<table style="width: 300px;height: 100px">
		<tr>
			<th style="font-weight: normal;width: 100px">工 号</th>
			<td><input name="username" type="text" style="width: 150px;" class="easyui-validatebox" data-options="required:true,missingMessage:'请输入用户名!'" />
			</td>
		</tr>
		<tr>
			<th style="font-weight: normal;">密 码</th>
			<td><input name="password" type="password" style="width: 150px;" class="easyui-validatebox" data-options="required:true,missingMessage:'请输入密码!'" />
			</td>
		</tr>
	</table>
	</form>
</div>